<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromCollection;

class MyExport implements FromCollection
{
    protected $data1;
    protected $data2;
    protected $data3;
    protected $data4;
    public function __construct($data1, $data2, $data3, $data4)
    {
        $this->data1 = $data1;
        $this->data2 = $data2;
        $this->data3 = $data3;
        $this->data4 = $data4;
    }

    /**
    * @return \Illuminate\Support\Collection
    */
    public function collection()
    {
        return collect($this->data1);
    }
}
